* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 5px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 5px;
    filter: blur(10px);
    cursor: pointer;
    background: #979fda40;
    margin-right: 5px;
}

#app {
    position: relative;
    height: 100%;
    width: 100%;
    user-select: none;
    transition: all 0.3s ease-in-out;
}

#app canvas {
    display: block;
    margin: 0 auto;
    opacity: 0;
    transform: translate3d(0, 100%, 0) scale(0.8);
    transition: opacity .5s, transform .8s cubic-bezier(.22, .69, .72, .88);
}

#app.show canvas {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.control_box {
    position: absolute;
    right: 30px;
    bottom: 50px;
    width: 70px;
    height: 60px;
    background-image: url(../image/hz.png);
    background-size: cover;
    transition: transform 1.1s cubic-bezier(.34, 1.56, .64, 1);
    animation: slide-in 1s ease-in-out;
}

@keyframes slide-in {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.control_box.clicked {
    transform: translateY(-330%) rotateY(180deg) translateX(-10px);
}

.control_btn {
    opacity: 0;
    position: absolute;
    right: 0;
    max-height: 180px;
    bottom: 20%;
    border-radius: 10px;
    font-size: 14px;
    background-color: transparent;
    z-index: 9999;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.control_btn:hover {
    overflow-y: auto;
}

#up_arrow {
    display: flex;
    justify-content: center;
    /* 初始状态隐藏 */
    opacity: 0;
    color: #fff;
    /* 添加过渡效果 */
    transition: opacity 0.6s ease-in-out;
}

#down_arrow {
    display: flex;
    justify-content: center;
    color: #fff;
    /* 添加过渡效果 */
    transition: opacity 0.6s ease-in-out;
}

.control_btn.active {
    opacity: 1;
    visibility: visible;
}

.control_item {
    width: 50px;
    height: 45px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    background-color: #FFFCF3;
    color: #53342A;
    text-align: center;
    cursor: pointer;
    margin: 10px;
}

.control_item:not(:last-child) {
    margin-bottom: 10px;
}

.control_item:hover {
    color: #B22222;
}

#message_box {
    position: absolute;
    opacity: 0;
    width: 280px;
    height: 100px;
    line-height: 100px;
    background-image: url(../image/dialogBox.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
    font-size: 15px;
    color: #53342A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation-delay: 5s;
    animation-duration: 50s;
    animation-iteration-count: infinite;
    animation-name: shake;
    animation-timing-function: ease-in-out;
}

@keyframes shake {
    2% {
        transform: translate(0.5px, -1.5px) rotate(-0.5deg);
    }

    4% {
        transform: translate(0.5px, 1.5px) rotate(1.5deg);
    }

    6% {
        transform: translate(1.5px, 1.5px) rotate(1.5deg);
    }

    8% {
        transform: translate(2.5px, 1.5px) rotate(0.5deg);
    }

    10% {
        transform: translate(0.5px, 2.5px) rotate(0.5deg);
    }

    12% {
        transform: translate(1.5px, 1.5px) rotate(0.5deg);
    }

    14% {
        transform: translate(0.5px, 0.5px) rotate(0.5deg);
    }

    16% {
        transform: translate(-1.5px, -0.5px) rotate(1.5deg);
    }

    18% {
        transform: translate(0.5px, 0.5px) rotate(1.5deg);
    }

    20% {
        transform: translate(2.5px, 2.5px) rotate(1.5deg);
    }

    22% {
        transform: translate(0.5px, -1.5px) rotate(1.5deg);
    }

    24% {
        transform: translate(-1.5px, 1.5px) rotate(-0.5deg);
    }

    26% {
        transform: translate(1.5px, 0.5px) rotate(1.5deg);
    }

    28% {
        transform: translate(-0.5px, -0.5px) rotate(-0.5deg);
    }

    30% {
        transform: translate(1.5px, -0.5px) rotate(-0.5deg);
    }

    32% {
        transform: translate(2.5px, -1.5px) rotate(1.5deg);
    }

    34% {
        transform: translate(2.5px, 2.5px) rotate(-0.5deg);
    }

    36% {
        transform: translate(0.5px, -1.5px) rotate(0.5deg);
    }

    38% {
        transform: translate(2.5px, -0.5px) rotate(-0.5deg);
    }

    40% {
        transform: translate(-0.5px, 2.5px) rotate(0.5deg);
    }

    42% {
        transform: translate(-1.5px, 2.5px) rotate(0.5deg);
    }

    44% {
        transform: translate(-1.5px, 1.5px) rotate(0.5deg);
    }

    46% {
        transform: translate(1.5px, -0.5px) rotate(-0.5deg);
    }

    48% {
        transform: translate(2.5px, -0.5px) rotate(0.5deg);
    }

    50% {
        transform: translate(-1.5px, 1.5px) rotate(0.5deg);
    }

    52% {
        transform: translate(-0.5px, 1.5px) rotate(0.5deg);
    }

    54% {
        transform: translate(-1.5px, 1.5px) rotate(0.5deg);
    }

    56% {
        transform: translate(0.5px, 2.5px) rotate(1.5deg);
    }

    58% {
        transform: translate(2.5px, 2.5px) rotate(0.5deg);
    }

    60% {
        transform: translate(2.5px, -1.5px) rotate(1.5deg);
    }

    62% {
        transform: translate(-1.5px, 0.5px) rotate(1.5deg);
    }

    64% {
        transform: translate(-1.5px, 1.5px) rotate(1.5deg);
    }

    66% {
        transform: translate(0.5px, 2.5px) rotate(1.5deg);
    }

    68% {
        transform: translate(2.5px, -1.5px) rotate(1.5deg);
    }

    70% {
        transform: translate(2.5px, 2.5px) rotate(0.5deg);
    }

    72% {
        transform: translate(-0.5px, -1.5px) rotate(1.5deg);
    }

    74% {
        transform: translate(-1.5px, 2.5px) rotate(1.5deg);
    }

    76% {
        transform: translate(-1.5px, 2.5px) rotate(1.5deg);
    }

    78% {
        transform: translate(-1.5px, 2.5px) rotate(0.5deg);
    }

    80% {
        transform: translate(-1.5px, 0.5px) rotate(-0.5deg);
    }

    82% {
        transform: translate(-1.5px, 0.5px) rotate(-0.5deg);
    }

    84% {
        transform: translate(-0.5px, 0.5px) rotate(1.5deg);
    }

    86% {
        transform: translate(2.5px, 1.5px) rotate(0.5deg);
    }

    88% {
        transform: translate(-1.5px, 0.5px) rotate(1.5deg);
    }

    90% {
        transform: translate(-1.5px, -0.5px) rotate(-0.5deg);
    }

    92% {
        transform: translate(-1.5px, -1.5px) rotate(1.5deg);
    }

    94% {
        transform: translate(0.5px, 0.5px) rotate(-0.5deg);
    }

    96% {
        transform: translate(2.5px, -0.5px) rotate(-0.5deg);
    }

    98% {
        transform: translate(-1.5px, -1.5px) rotate(-0.5deg);
    }

    0%,
    100% {
        transform: translate(0, 0) rotate(0);
    }
}